package com.neutech.service.impl;
import com.neutech.mapper.PayrecordMapper;
import com.neutech.service.PayrecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public  class PayrecordServiceImpl implements PayrecordService {
    @Autowired
    private PayrecordMapper payrecordMapper;
    @Override
    public List<Map<String, Object>> queryPayrecord() {
        List<Map<String, Object>> list = payrecordMapper.queryPayrecordList(0);
        return list;
    }
    @Override
    public void insertPayrecord(Map map){
        Integer a = payrecordMapper.addPayrecord(map);

    }
    public void updataPayrecord(Map map){
        payrecordMapper.updataPayrecordById(map);
    }
    @Override
    public void deletePayrecord(Map map){
       // payrecordMapper.delPayrecordById(map);
//        System.out.println(map.get("oid"));
//        System.out.println("kanzheli");
        Integer oid= Integer.valueOf(map.get("oid").toString());
        payrecordMapper.delPayrecordById(oid);
    }
}
